Use protojson marshaling for payload HTTP handler response#2315
Merged
jmaeagle99 merged 3 commits intotemporalio:mainfrom Apr 29, 2026
Merged
Use protojson marshaling for payload HTTP handler response#2315jmaeagle99 merged 3 commits intotemporalio:mainfrom
jmaeagle99 merged 3 commits intotemporalio:mainfrom
Conversation
yuandrew
reviewed
Apr 29, 2026
yuandrew
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Update the
payloadHTTPHandlerto write response as Protobuf JSON (according to codec server spec) instead of as plain JSON.Why?
The codec server spec says that requests and responses should be interpreted with Protobuf JSON encoders.
The main observable difference is that plain JSON encoding would use snake_case for field names whereas Protobuf JSON uses camelCase for field names. This hasn't been an issue in the past because
PayloadsandPayloadmessages have property names that were only one word, thus the same in camelCase and snake_case.With the introduction of the
external_payloadsfield on thePayloadprotobuf message and thesize_bytesfield on theExternalPayloadDetailsprotobuf message, these fields are being written as snake_case when serializing as plain json. The Web UI is expecting camelCase properties.Brief testing with the Web UI and inspection of the code shows that this works. The Temporal CLI is already using NewRemotePayloadCodec from sdk-go, which is using protojson.Unmarshal on the response.
Checklist